<template>
  <div class="header">
    <div class="header-left">
      <div class="iconfont header-back">&#xe971;</div>
    </div>
    <div class="header-input">
      <span class="iconfont">&#xe610;</span>
      输入城市/景点/游玩主题
    </div>
    <router-link to="/city">
      <div class="header-right">
        {{city}}
        <span class="iconfont arrow-icon">&#xe600;</span>
      </div>
    </router-link>
  </div>
</template>

<script>
import {mapState} from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/variable.styl'
  @import '~styles/mixins.styl'
  .header
    display: flex
    align-items: center
    height: $headerHeight
    line-height: $headerHeight
    background-color: $themeColor
    color: #fff
    .header-left
      width: .64rem
      text-align: center
      .header-back
        font-size .4rem
    .header-input
      flex: 1
      margin 0 .1rem
      padding-left: .1rem
      height: .62rem
      line-height: .62rem
      border-radius .1rem
      background: #fff
      color: #ccc
    .header-right
      text-align: center
      min-width: 1.04rem
      padding 0 .1rem
      box-sizing border-box
      color #fff
      ellipise()
      .arrow-icon
        margin-left: -.04rem
</style>
